﻿@using Covenant.Models.Grunts
@model IEnumerable<ImplantTemplate>
@{
    Layout = "_ImplantTemplateLayout";
    ViewData["Title"] = "ImplantTemplates";
}
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pb-2 mb-3">
    <h1 class="h2">ImplantTemplates</h1>
</div>

<div class="table-responsive">
    <table id="implant-table" class="table table-hover">
        <thead>
            <tr>
                <th>@Html.DisplayNameFor(model => model.Name)</th>
                <th>@Html.DisplayNameFor(model => model.Description)</th>
                <th>@Html.DisplayNameFor(model => model.Language)</th>
                <th>@Html.DisplayNameFor(model => model.CommType)</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model)
            {
                <tr>
                    <td>
                        <a asp-controller="Template" asp-action="Edit" asp-route-id="@item.Id">
                            @Html.DisplayFor(modelItem => item.Name)
                        </a>
                    </td>
                    <td>@Html.DisplayFor(modelItem => item.Description)</td>
                    <td>@Html.DisplayFor(modelItem => item.Language)</td>
                    <td>@Html.DisplayFor(modelItem => item.CommType)</td>
                </tr>
            }
        </tbody>
    </table>
</div>

<a asp-controller="Template" asp-action="Create" class="btn btn-primary">
    <span data-feather="plus"></span>
    Create
</a>

@section Scripts {
    <script type="text/javascript">
    $(document).ready(function() {
        $('#implant-table').DataTable({
            "pageLength": 50,
            "info": false
        });
    });
    </script>
}